<div class="row">
	<aside class="span3">
		<%@ include file="/WEB-INF/jsp/decorators/menu/left.jsp" %>
	</aside>
	<div class="span9">
		<ul class="breadcrumb">
			<li><a href="${pageContext.request.contextPath}/<fmt:message key="breadcrumbs.killline.link"/>"><fmt:message key="breadcrumbs.killline"/></a> <span class="divider">/</span></li>
			<li class="active"><fmt:message key="breadcrumbs.usuario.cadastrar"/></li>
		</ul>
		
		<c:if test="${not empty errors}">
			<div class="alert alert-error">
				<c:forEach items="${errors}" var="error">
        			${error.message} <br/>
				</c:forEach>
			</div>
		</c:if>
		<c:if test="${not empty success}">
			<div class="alert alert-success">
				<fmt:message key="${success}"/>
			</div>
		</c:if>

		<form class="form-horizontal" method="POST" action="${pageContext.request.contextPath}/usuario/cadastrar">
			<fieldset>
				<legend><fmt:message key="usuario.cadastro.titulo"/></legend>
				<div class="control-group">
					<label class="control-label required" for="usuario.nome"><fmt:message key="usuario.cadastro.nome"/>*</label>
					<div class="controls">
						<input class="span5" type="text" value="${usuario.nome}" name="usuario.nome" id="usuario.nome" placeholder="<fmt:message key="usuario.cadastro.nome"/>">
					</div>
				</div>
				<div class="control-group">
					<label class="control-label required" for="usuario.login"><fmt:message key="usuario.cadastro.login"/>*</label>
					<div class="controls">
						<input class="span5" type="text" value="${usuario.login}" name="usuario.login" id="usuario.login" placeholder="<fmt:message key="usuario.cadastro.login"/>">
					</div>
				</div>
				<div class="control-group">
					<label class="control-label required" for="usuariotelefone"><fmt:message key="usuario.cadastro.telefone"/>*</label>
					<div class="controls">
						<input class="span5" type="text" value="${usuario.telefone}" name="usuario.telefone" id="usuariotelefone" placeholder="<fmt:message key="usuario.cadastro.telefone"/>">
					</div>
				</div>
				<div class="control-group">
					<label class="control-label" for="usuario.email"><fmt:message key="usuario.cadastro.email"/></label>
					<div class="controls">
  						<input class="span5" type="text" value="${usuario.email}" name="usuario.email" id="usuario.email" placeholder="<fmt:message key="usuario.cadastro.email"/>">
					</div>
				</div>
				<div class="control-group">
					<label class="control-label required" for="usuario.senha"><fmt:message key="usuario.cadastro.senha"/>*</label>
					<div class="controls">
  						<input class="span5" type="password" value="" name="usuario.senha" id="usuario.senha" placeholder="<fmt:message key="usuario.cadastro.senha"/>">
					</div>
				</div>
				<div class="control-group">
					<label class="control-label required" for="repitasenha"><fmt:message key="usuario.cadastro.repetesenha"/>*</label>
					<div class="controls">
  						<input class="span5" type="password" value="" name="repitasenha" id="repitasenha" placeholder="<fmt:message key="usuario.cadastro.repetesenha"/>">
					</div>
				</div>

				<div class="form-actions">
					<button type="submit" class="btn btn-primary"><fmt:message key="usuario.cadastro.cadastrarusuario"/></button>
					<button type="button" class="btn"><fmt:message key="form.cancelar"/></button>
				</div>
			</fieldset>
		</form>
	</div>
</div>

<script src="${pageContext.request.contextPath}/plugins/validate/jquery.maskedinput-1.3.min.js"></script>
<script>
	(function($){
		$(document).ready(function(){
			$("#usuariotelefone").mask("?(99) 9999-9999");
		});
	})(jQuery);
</script>